import axios from "axios"
export let setName = ()=>{ // 同步的方法直接返回一个对象
   
    return {
        type:"aaa",
        payload:"zhaoliu"
    }
}

export let getList = ()=>{ // 异步方法return一个函数
    return (dispatch)=>{
        axios.get("https://baojia.chelun.com/v2-car-getMasterBrandList.html").then(res=>{
            dispatch({
                type:"ccc",
                payload:res.data.data
            })
        })
    }
}